//
//  City.m
//  07-HomeWork
//
//  Created by dllo on 16/7/12.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "City.h"

@implementation City
- (void)dealloc {
    [_array release];
    [super dealloc];
}
- (void)setArray:(NSMutableArray *)array {
    if (_array != array) {
        [_array release];
        _array = [array retain];
    }
}
- (instancetype)initWithName:(NSString *)name {
    return [self initWithName:name number:nil];
}

- (instancetype)initWithName:(NSString *)name number:(NSString *)number {
    self = [super initWithName:name number:number];
    if (self) {
        _array = [NSMutableArray array];
    }
    return self;
}

- (NSString *)description {
    return [NSString stringWithFormat:@"%@ %@ %@",self.name,self.number, self.array];
}
@end
